# -*- coding: utf-8 -*-
from PyQt4 import QtGui

from ui.uiMenuEditarDb import UiMenuEditarDb
from db.dataBase import DataBase
from actions.actionsUiMenuEditarDb import ActionsUiMenuEditarDb


class RunnerUiMenuEditarDb(QtGui.QWidget):

    def __init__(self, parent = None):
        """
            Construtor da classe.
        """
        QtGui.QWidget.__init__(self, parent)
        self.setupUi()



    def setupUi(self):
        """
            Instancia e inicia os modulos necessarios.
        """
        self.uiMenuEditarDb = UiMenuEditarDb()
        self.uiMenuEditarDb.setupUi(self)
        self.db = DataBase()
        self.ActionsUiMenuEditarDb = ActionsUiMenuEditarDb(
                                        self.uiMenuEditarDb,
                                        self.db)



    def run(self):
        """
            Metodo para rodar a aplicacao.
        """
        self.uiMenuEditarDb.form.show()
